home *** CD-ROM | disk | FTP | other *** search
/ Software Explosion 2 / Software Explosion 2 - Virtual Computer Pets (1997).iso / windoze / whiskers / kcip1.dxr / 00024.ls < prev    next >
Encoding:
Text File  |  1997-07-01  |  819 b   |  31 lines

  1. on mouseDown
  2.   global lastballx, lastbally
  3.   set lastballx to the locH of sprite 16
  4.   set lastbally to the locV of sprite 16
  5. end
  6.  
  7. on mouseUp
  8.   global activity, lastballx, lastbally
  9.   set the moveableSprite of sprite 15 to 0
  10.   if the locH of sprite 16 > lastballx then
  11.     repeat with x = 15 down to 1
  12.       set the locH of sprite 16 to the locH of sprite 16 + x
  13.       if (x mod 2) = 0 then
  14.         set the locV of sprite 16 to the locV of sprite 16 + random(3)
  15.       end if
  16.       updateStage()
  17.     end repeat
  18.   else
  19.     repeat with x = 15 down to 1
  20.       set the locH of sprite 16 to the locH of sprite 16 - x
  21.       if (x mod 2) = 0 then
  22.         set the locV of sprite 16 to the locV of sprite 16 + random(3)
  23.       end if
  24.       updateStage()
  25.     end repeat
  26.   end if
  27.   checkbounds(16)
  28.   grav(16)
  29.   set activity to 3
  30. end
  31.